<!doctype html>
<style>
    .open {
        color: green;
    }
    .closed {
        color: red;
    }
</style>
<details open class="open">
    <summary>Hi</summary>
    Well hello friends!
</details>
<details class="closed">
    <summary>Hi</summary>
    Well hello friends!
</details>
